package com.zhiyou100.interface_demo3;

/**
 * 程序员
 * 一个类可以实现多个接口
 */
public class Programmer implements Work{
    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Programmer(String name) {
        this.name = name;
    }

    public Programmer() {
    }

    @Override
    public void startWork() {
        System.out.println(name + "打开电脑，开始今天的需求");
    }

    @Override
    public void endWork() {
        System.out.println(name + "提交代码，关闭电脑，回家");
    }

    @Override
    public void abideByLaw() {
        System.out.println(name + "要遵纪守法，遵守职业操守");
    }

    @Override
    public void sport() {
        System.out.println("程序员需要锻炼身体，更好的写代码");
    }
}
